<?php
namespace Portal\Model;
use Common\Model\CommonModel;
class ChairmanMailboxModel extends CommonModel{
    protected $_validate = array(
        array('full_name', 'require', "请填写姓名！"),
        array('mobile','#^13[\d]{9}$|^14[5,7]{1}\d{8}$|^15[^4]{1}\d{8}$|^17[0,6,7,8]{1}\d{8}$|^18[\d]{9}$#','请填写正确的手机号!',self::VALUE_VALIDATE,),
        array('email','email','请填写正确的邮箱！',self::VALUE_VALIDATE),
        array('title', 'require', "请填写主题！"),
        array('content', 'require', "请填写内容！"),
    );

    protected $_auto = array(
        array('post_date', 'mGetDate', self::MODEL_INSERT, 'callback'),

    );

    function mGetDate() {
        return date('Y-m-d H:i:s');
    }
}